#include "Shm.hpp"
#include "common.hpp"
#include <unistd.h>

void test()
{
    Shm shm(PATH, USER);
    Client client(PATH, FILENAME);
    char* str = (char*)shm.virtualAddr();

    int index = 0;
    for (int i = 'A'; i <= 'Z'; ++i, index += 2)
    {
        str[index] = i;
        str[index + 1] = i;
        str[index + 2] = 0;

        client.send();
        sleep(1);
    }
}

int main()
{
    test();
    
    return 0;
}
